package com.feifan.oa.service.impl;

import com.feifan.common.core.text.Convert;
import com.feifan.oa.domain.HolidayWorkingDate;
import com.feifan.oa.mapper.HolidayWorkingDateMapper;
import com.feifan.oa.service.IHolidayWorkingDateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 调休时间Service业务层处理
 * 
 * @author 非凡
 * @date 2020-07-01
 */
@Service
public class HolidayWorkingDateServiceImpl implements IHolidayWorkingDateService 
{
    @Autowired
    private HolidayWorkingDateMapper holidayWorkingDateMapper;

    /**
     * 查询调休时间
     * 
     * @param id 调休时间ID
     * @return 调休时间
     */
    @Override
    public HolidayWorkingDate selectHolidayWorkingDateById(Long id)
    {
        return holidayWorkingDateMapper.selectHolidayWorkingDateById(id);
    }

    @Override
    public List<HolidayWorkingDate> selectHolidayWorkingDateList() {
        return holidayWorkingDateMapper.selectHolidayWorkingDateList();
    }

    /**
     * 查询调休时间列表
     * 
     * @param holidayWorkingDate 调休时间
     * @return 调休时间
     */
    @Override
    public List<HolidayWorkingDate> selectHolidayWorkingDateListByHId(HolidayWorkingDate holidayWorkingDate)
    {
        return holidayWorkingDateMapper.selectHolidayWorkingDateListByHId(holidayWorkingDate);
    }

    /**
     * 新增调休时间
     * 
     * @param holidayWorkingDate 调休时间
     * @return 结果
     */
    @Override
    public int insertHolidayWorkingDate(HolidayWorkingDate holidayWorkingDate)
    {
        return holidayWorkingDateMapper.insertHolidayWorkingDate(holidayWorkingDate);
    }

    /**
     * 修改调休时间
     * 
     * @param holidayWorkingDate 调休时间
     * @return 结果
     */
    @Override
    public int updateHolidayWorkingDate(HolidayWorkingDate holidayWorkingDate)
    {
        return holidayWorkingDateMapper.updateHolidayWorkingDate(holidayWorkingDate);
    }

    /**
     * 删除调休时间对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteHolidayWorkingDateByIds(String ids)
    {
        return holidayWorkingDateMapper.deleteHolidayWorkingDateByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除调休时间信息
     * 
     * @param id 调休时间ID
     * @return 结果
     */
    @Override
    public int deleteHolidayWorkingDateByHId(Long id)
    {
        return holidayWorkingDateMapper.deleteHolidayWorkingDateByHId(id);
    }

    @Override
    public int deleteHolidayWorkingDateById(Long id) {
        return holidayWorkingDateMapper.deleteHolidayWorkingDateById(id);
    }
}
